<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
::-webkit-scrollbar {
  width: 20px;
  height: 20px;
}
#space {
  height: 1000px;
  width: 1000px;
}
</style>
<div id="space"></div>
<script>

description(
    "Tests that the html element excludes scrollbars when reporting " +
    "clientWidth and clientHeight, and that it implements scroll() " +
    "by scrolling the frame.");

var htmlElement = document.documentElement;
shouldBe("htmlElement.clientWidth", "innerWidth - 20");
shouldBe("htmlElement.clientHeight", "innerHeight - 20");

htmlElement.scroll(10, 10);
shouldBe("scrollX", "10");
shouldBe("scrollY", "10");

</script>
